package com.ruoyi.datastatistics.service;

import com.ruoyi.basedata.domain.TerminalsDb;
import com.ruoyi.datastatistics.domain.createcommand.PresetCommandDataInfo;
import org.apache.commons.codec.DecoderException;

import java.util.List;

/**
 * @author TsingYu
 * @version 1.0
 * @date 2025/1/11 14:36
 */
public interface TerminalsDbCommandService {
    /**
     * 终端多参数读取命令
     *
     * @param terminalsDb data
     * @param presetCommandDatas presetCommandDatas
     * @return List
     * @throws Exception Exception
     */
    List<PresetCommandDataInfo> sendPresetReadCommand(TerminalsDb terminalsDb, List<PresetCommandDataInfo> presetCommandDatas) throws Exception;

    /**
     * 下发命令——多参数设置
     * @param terminalsDb terminalsDb
     * @param presetCommandDatas presetCommandDatas
     * @param commandType 命令类型（1：预置命令，2：实时命令）
     * @return boolean
     * @throws Exception Exception
     */
    boolean sendPresetWriteCommand(TerminalsDb terminalsDb, List<PresetCommandDataInfo> presetCommandDatas, int commandType) throws Exception;
}
